﻿@using FikriKibar.Globalization
@using FikriKibar.UI.WebCommon.Helpers
@using FikriKibar.Entities.Composite.ContentCategoryModels
@model AddModel
@{
    ViewBag.Title = Resources.NewRecord;
    Layout = "~/Views/Shared/ContentLayout.cshtml";
}

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">@Resources.ContentCategoryManagement</h1>
        </div>
    </div>
    <div class="row">

        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    @Resources.NewRecord
                </div>
                <div class="panel-body">
                    @using (Html.BeginForm("Add", "ContentCategory", FormMethod.Post, new { @role = "form" }))
                    {

                        <div class="form-group">
                            <label class="control-label" for="SelectedLanguageIds">@Resources.Language</label>
                            <div>
                                @Html.FikriKibarListBoxFor(m => m.SelectedLanguageIds, new SelectList(Model.LanguageList, "Id", "LanguageName"), new { @class = "form-control multiple", @multiple = "multiple", @selectalltext = "[" + Resources.All + "]", @nonselectedtext = Resources.NonSelected })
                            @Html.ValidationMessageFor(m => m.SelectedLanguageIds)
                        </div>

                    </div>
                        <div class="form-group">
                            <label class="control-label" for="SelectedContentTypeId">@Resources.ContentType</label>
                            @Html.FikriKibarDropDownListFor(m => m.SelectedContentTypeId, new SelectList(Model.ContentTypeList, "ContentTypeId", "ContentTypeName"), new { @class = "form-control" })
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="SelectedContentCategoryId">@Resources.ParentCategory</label>
                            @Html.FikriKibarDropDownListFor(m => m.SelectedContentCategoryId, new SelectList(Model.ContentCategoryList, "ContentCategoryId", "ParentNames"), new { @class = "form-control" })
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="Item_ContentCategoryName">@Resources.Name</label>
                            @Html.FikriKibarTextBoxFor(m => m.Item.ContentCategoryName, new { @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.Item.ContentCategoryName)
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="Item_ContentCategoryDescription">@Resources.Description</label>
                            @Html.TextAreaFor(m => m.Item.ContentCategoryDescription, new { @class = "form-control" })
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="Item_PublishBeginDate">@Resources.PublishBeginDate</label>
                            @Html.FikriKibarTextBoxFor(m => m.Item.PublishBeginDate, new { Value = DateTime.Now.ToString("d"), @class = "form-control datepicker" })
                            @Html.ValidationMessageFor(m => m.Item.PublishBeginDate)
                        </div>
                        <div class="form-group">
                            <label class="control-label" for="Item_PublishEndDate">@Resources.PublishEndDate</label>
                            @Html.FikriKibarTextBoxFor(m => m.Item.PublishEndDate, new { Value = DateTime.Now.AddYears(10).ToString("d"), @class = "form-control datepicker" })
                            @Html.ValidationMessageFor(m => m.Item.PublishEndDate)
                        </div>
                        <div class="form-group">
                            <div class="checkbox">
                                <label>
                                    @Html.CheckBoxFor(m => m.Item.IsApproved) @Resources.Approve
                                </label>
                            </div>

                        </div>
                        <button class="btn btn-primary"><i class="fa fa-save"></i>&nbsp;@Resources.Save</button>
                    }
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12 text-center">
                    @Html.FikriKibarAlertFor(m => m.Message, "div", Model.Message, new { @class = "alert alert-danger" })
                </div>
            </div>
        </div>
    </div>
</div>
